﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SubVersionOne.ViewModel
{
    [Serializable()]
    public class StoryViewModel : ViewModelBase
    {
         private string _StoryID;
        private string _Name;
        private string _Description;
        private bool _Selected;

        public bool Selected
        {
            get
            {
                return _Selected;
            }
            set
            {
                _Selected = value;
                this.RaisePropertyChanged("Selected");
            }
        }

        public string StoryID
        {
            get
            {
                return _StoryID;
            }
            set
            {
                _StoryID = value;
                this.RaisePropertyChanged("StoryID");
            }
        }
        public string Name
        {
            get
            {
                return _Name;
            }
            set
            {
                _Name = value;
                this.RaisePropertyChanged("Name");
            }
        }

        public string DisplayName
        {
            get
            {
                return String.Format("{0}:{1}", this.StoryID, this.Name);
            }
        }

        public string Description
        {
            get
            {
                return _Description;
            }
            set
            {
                _Description = value;
                this.RaisePropertyChanged("Description");
            }
        }

        private ObservableCollection<TaskViewModel> _Tasks;
        public ObservableCollection<TaskViewModel> Tasks
        {
            get
            {
                return _Tasks;
            }
            set
            {
                _Tasks = value;
                this.RaisePropertyChanged("Tasks");
            }
        }
    
    }
}
